//
//  ViewController.m
//  UITextField
//
//  Created by Justsoso on 16/2/19.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *sumLabel;
@property (weak, nonatomic) IBOutlet UITextField *num1TextField;
@property (weak, nonatomic) IBOutlet UITextField *num2TextField;
@property (weak, nonatomic) IBOutlet UILabel *background;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)backTop:(id)sender
{
    [self.view endEditing:YES];
}
- (IBAction)btnPressed:(UIButton *)sender
{
    self.sumLabel.text = [NSString stringWithFormat:@"%i",[self.num1TextField.text intValue]+[self.num2TextField.text intValue]];
}

@end
